package com.gxuwz.check.service.admin.impl;

import com.gxuwz.check.dao.admin.ITeacherAdminDao;
import com.gxuwz.check.model.dto.TeacherDto;
import com.gxuwz.check.model.entity.SysClassEntity;
import com.gxuwz.check.model.entity.SysTeacherEntity;
import com.gxuwz.check.service.admin.ITeacherAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("TeacherServiceImpl")
public class TeacherAdminServiceImpl implements ITeacherAdminService {
    @Autowired
    private ITeacherAdminDao teacherDao;
    @Override
    public List<TeacherDto> list(int page) {
        return teacherDao.list(page);
    }

    @Override
    public void delete(Integer teacherId) {
        teacherDao.delete(teacherId);
    }

    @Override
    public void edit() {

    }

    @Override
    public void save(String teacherName,Integer teacherSex,String teacherTel,String collegeIdAdd,String classId) {
        teacherDao.save(teacherName,teacherSex,teacherTel,collegeIdAdd,classId);
    }

    @Override
    public List<SysClassEntity> listClassByCollegeId(Integer collegeId) {
        return teacherDao.listClassByCollegeId(collegeId);
    }

    @Override
    public SysTeacherEntity findTeacherById(Integer teacherId) {
        return teacherDao.findTeacherById(teacherId);
    }
}
